﻿using Models;
using Models.DTO;
using System;
using System.Collections.Generic;
using System.Text;

namespace IBLL
{
    /// <summary>
    /// 商店员工表业务逻辑层--接口
    /// </summary>
    public interface IStaffInfoBLL
    {
        /// <summary>
        /// 商店员工登录业务逻辑
        /// </summary>
        /// <param name="account">账号</param>
        /// <param name="password">密码</param>
        /// <param name="msg">返回的消息</param>
        /// <param name="staffName">返回的员工名</param>
        /// <param name="staffId">返回的员工Id</param>
        /// <returns></returns>
        bool Login(string account, string password, out string msg, out string staffName, out string staffId);

        /// <summary>
        /// 查询员工列表的接口--分页
        /// </summary>
        /// <param name="page">第几页</param>
        /// <param name="limit">每页几条数据</param>
        /// <param name="account">员工账号</param>
        /// <param name="staffName">员工姓名</param>
        /// <param name="count">数据总量</param>
        /// <returns></returns>
        List<GetStaffInfoDTO> GetStaffInfo(int page, int limit, string account, string staffName, out int count);

        /// <summary>
        /// 查询员工列表的接口
        /// </summary>
        /// <returns></returns>
        List<GetStaffInfoDTO> GetStaffInfos();

        /// <summary>
        /// 添加员工的接口
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="msg"></param>
        /// <returns></returns>
        bool CreateStaffInfo(StaffInfo entity, out string msg);

        /// <summary>
        /// 员工软删除的接口
        /// </summary>
        /// <param name="id">被删除的员工id</param>
        /// <returns></returns>
        bool DeleteStaffInfo(string id);

        /// <summary>
        /// 员工批量软删除的接口
        /// </summary>
        /// <param name="ids">被删除的员工id集合</param>
        /// <returns></returns>
        bool DeleteStaffInfo(List<string> ids);

        /// <summary>
        /// 更新员工信息的接口
        /// </summary>
        /// <param name="staffInfo">要更新的实体</param>
        /// <param name="msg">返回的描述信息</param>
        /// <returns></returns>
        bool UpdateStaffInfo(StaffInfo staffInfo, out string msg);

        /// <summary>
        /// 根据员工的id获取员工的信息
        /// </summary>
        /// <param name="id">员工的Id</param>
        /// <returns></returns>
        GetStaffInfoDTO GetStaffInfoById(string id);

        /// <summary>
        /// 更新员工信息
        /// </summary>
        /// <param name="id">员工id</param>
        /// <param name="oldPwd">旧的密码</param>
        /// <param name="newPwd">新的密码</param>
        /// <param name="againPwd">确认密码</param>
        /// <param name="msg">返回的消息</param>
        /// <returns></returns>
        bool UpdateStaffPwd(string id, string oldPwd, string newPwd, string againPwd, out string msg);
    }
}
